<div class="g-col g-col-2">
  <div class="par parsys">
    <div class="newsarticlelist">
      <div class="mod mod-ajax-html-replacer">
        <?php
        if (isset($data) && !empty($data)) {
          foreach ($data as $k => $item) {
            ?>
            <div class="block">
              <article class="mod mod-block <?= $k % 2 == 0 ? 'skin-block-right' : 'skin-block-left' ?> skin-block-width50">
                <a class="b-secondary" href="<?= $item['url'] ?>">
                  <div class="wrapper title-wrapper responsive-content">
                    <div class="content rich">
                      <h3><?= $item['title'] ?></h3>
                    </div>
                  </div>
                  <div class="background">
                    <div class="responsive-content">
                      <img class="js-default show-center"
                           src="<?= $item['uri'] ?>" alt="" usemap="">
                    </div>
                  </div>
                  <div class="wrapper description-wrapper">
                    <div class="content rich">
                      <h3 class="desktop-only"><?= $item['title'] ?></h3>
                      <?= $item['summary'] ?>
                    </div>
                  </div>
                </a>
              </article>
            </div>
            <?php
          }
        }
        ?>
        <div class="pagination-box"><?= $page ?></div>
        <div class="mod mod-pagination">
          <form class="mod mod-form js-form b clearfix" novalidate="novalidate">
            <div class="selectbox clearfix">
              <select class="js-select ui-state-valid">
                <option value="10" <?= drupal_get_query_parameters()['limit'] == 10 ? "selected='selected'" : ''?>>每页显示 10 条</option>
                <option value="30" <?= drupal_get_query_parameters()['limit'] == 30 ? "selected='selected'" : ''?>>每页显示 30 条</option>
                <option value="50" <?= drupal_get_query_parameters()['limit'] == 50 ? "selected='selected'" : ''?>>每页显示 50 条</option>
              </select>
            </div>
          </form>
<!--          <div class="pages">-->
<!--            <span>页码</span>-->
<!--            <ul>-->
<!--              <li><a href="#" class="b js-link">1</a></li>-->
<!--              <li><a href="#" class="b-secondary js-link">2</a></li>-->
<!--              <li><a href="#" class="b-secondary js-link">3</a></li>-->
<!--              <li><a href="#" class="b-secondary js-link">4</a></li>-->
<!--              <li><a href="#" class="b-secondary js-link">5</a></li>-->
<!--            </ul>-->
<!--          </div>-->
        </div>
      </div>
    </div>
  </div>
</div>
<script>
  (function ($) {
    $('.js-select').change(function(){
      var url = '?';
      var limit = $('.js-select').val();

      if(limit != null && limit != undefined && limit != 0 && limit != ''){
        url += 'limit='+limit;
      }
      window.location.href= url;
    })
  })(jQuery);
</script>